package com.leps.nq.bi.mapper;

import com.leps.nq.bi.vo.SimpleEntry;
import com.leps.nq.op.entity.OpAlarm;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface CustBIMapper {
    int selectCustIdByCustUserId(Long userId);

    List<SimpleEntry<Long>> selectWellNumbersByCustGroupByArea(int custId);

    List<SimpleEntry<Double>> selectYearDosageByCustGroupByArea(int custId);

    List<SimpleEntry<Double>> selectMonthDosageByCustGroupByArea(int custId);

    List<SimpleEntry<Double>> selectTodayDosageByCustGroupByArea(int custId);

    SimpleEntry<Integer> selectProtectDayByCustId(int custId);

    List<SimpleEntry<Long>> countPumpNumberByCustGroupByOnlineStatus(int custId);

    List<Map> countAlarmByCustGroupByAlarmType(int custId);

    List<OpAlarm> selectUnhandledAlarmsByCustId(int custId);
}
